Optimal. Leaf size=202 \[ -\frac {b \left (24 a^2+35 b^2\right ) \sin (c+d x)}{8 d}-\frac {(a+b) \left (8 a^2+37 a b+35 b^2\right ) \log (1-\sin (c+d x))}{16 d}-\frac {(a-b) \left (8 a^2-37 a b+35 b^2\right ) \log (\sin (c+d x)+1)}{16 d}-\frac {3 a b^2 \sin ^2(c+d x)}{2 d}+\frac {\sec ^4(c+d x) (a+b \sin (c+d x))^3}{4 d}-\frac {\sec ^2(c+d x) (a+b \sin (c+d x))^2 (8 a+11 b \sin (c+d x))}{8 d}-\frac {b^3 \sin ^3(c+d x)}{3 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.34, antiderivative size = 202, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 5, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.238, Rules used = {2721, 1645, 1629, 633, 31} \[ -\frac {b \left (24 a^2+35 b^2\right ) \sin (c+d x)}{8 d}-\frac {(a+b) \left (8 a^2+37 a b+35 b^2\right ) \log (1-\sin (c+d x))}{16 d}-\frac {(a-b) \left (8 a^2-37 a b+35 b^2\right ) \log (\sin (c+d x)+1)}{16 d}-\frac {3 a b^2 \sin ^2(c+d x)}{2 d}+\frac {\sec ^4(c+d x) (a+b \sin (c+d x))^3}{4 d}-\frac {\sec ^2(c+d x) (a+b \sin (c+d x))^2 (8 a+11 b \sin (c+d x))}{8 d}-\frac {b^3 \sin ^3(c+d x)}{3 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 633
Rule 1629
Rule 1645
Rule 2721
Rubi steps
\begin {align*} \int (a+b \sin (c+d x))^3 \tan ^5(c+d x) \, dx &=\frac {\operatorname {Subst}\left (\int \frac {x^5 (a+x)^3}{\left (b^2-x^2\right )^3} \, dx,x,b \sin (c+d x)\right )}{d}\\ &=\frac {\sec ^4(c+d x) (a+b \sin (c+d x))^3}{4 d}+\frac {\operatorname {Subst}\left (\int \frac {(a+x)^2 \left (-3 b^6-4 a b^4 x-4 b^4 x^2-4 a b^2 x^3-4 b^2 x^4\right )}{\left (b^2-x^2\right )^2} \, dx,x,b \sin (c+d x)\right )}{4 b^2 d}\\ &=\frac {\sec ^4(c+d x) (a+b \sin (c+d x))^3}{4 d}-\frac {\sec ^2(c+d x) (a+b \sin (c+d x))^2 (8 a+11 b \sin (c+d x))}{8 d}+\frac {\operatorname {Subst}\left (\int \frac {(a+x) \left (21 a b^6+b^4 \left (8 a^2+27 b^2\right ) x+16 a b^4 x^2+8 b^4 x^3\right )}{b^2-x^2} \, dx,x,b \sin (c+d x)\right )}{8 b^4 d}\\ &=\frac {\sec ^4(c+d x) (a+b \sin (c+d x))^3}{4 d}-\frac {\sec ^2(c+d x) (a+b \sin (c+d x))^2 (8 a+11 b \sin (c+d x))}{8 d}+\frac {\operatorname {Subst}\left (\int \left (-24 a^2 b^4-35 b^6-24 a b^4 x-8 b^4 x^2+\frac {5 b^6 \left (9 a^2+7 b^2\right )+8 a b^4 \left (a^2+9 b^2\right ) x}{b^2-x^2}\right ) \, dx,x,b \sin (c+d x)\right )}{8 b^4 d}\\ &=-\frac {b \left (24 a^2+35 b^2\right ) \sin (c+d x)}{8 d}-\frac {3 a b^2 \sin ^2(c+d x)}{2 d}-\frac {b^3 \sin ^3(c+d x)}{3 d}+\frac {\sec ^4(c+d x) (a+b \sin (c+d x))^3}{4 d}-\frac {\sec ^2(c+d x) (a+b \sin (c+d x))^2 (8 a+11 b \sin (c+d x))}{8 d}+\frac {\operatorname {Subst}\left (\int \frac {5 b^6 \left (9 a^2+7 b^2\right )+8 a b^4 \left (a^2+9 b^2\right ) x}{b^2-x^2} \, dx,x,b \sin (c+d x)\right )}{8 b^4 d}\\ &=-\frac {b \left (24 a^2+35 b^2\right ) \sin (c+d x)}{8 d}-\frac {3 a b^2 \sin ^2(c+d x)}{2 d}-\frac {b^3 \sin ^3(c+d x)}{3 d}+\frac {\sec ^4(c+d x) (a+b \sin (c+d x))^3}{4 d}-\frac {\sec ^2(c+d x) (a+b \sin (c+d x))^2 (8 a+11 b \sin (c+d x))}{8 d}+\frac {\left ((a-b) \left (8 a^2-37 a b+35 b^2\right )\right ) \operatorname {Subst}\left (\int \frac {1}{-b-x} \, dx,x,b \sin (c+d x)\right )}{16 d}+\frac {\left ((a+b) \left (8 a^2+37 a b+35 b^2\right )\right ) \operatorname {Subst}\left (\int \frac {1}{b-x} \, dx,x,b \sin (c+d x)\right )}{16 d}\\ &=-\frac {(a+b) \left (8 a^2+37 a b+35 b^2\right ) \log (1-\sin (c+d x))}{16 d}-\frac {(a-b) \left (8 a^2-37 a b+35 b^2\right ) \log (1+\sin (c+d x))}{16 d}-\frac {b \left (24 a^2+35 b^2\right ) \sin (c+d x)}{8 d}-\frac {3 a b^2 \sin ^2(c+d x)}{2 d}-\frac {b^3 \sin ^3(c+d x)}{3 d}+\frac {\sec ^4(c+d x) (a+b \sin (c+d x))^3}{4 d}-\frac {\sec ^2(c+d x) (a+b \sin (c+d x))^2 (8 a+11 b \sin (c+d x))}{8 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 1.02, size = 199, normalized size = 0.99 \[ -\frac {144 b \left (a^2+b^2\right ) \sin (c+d x)+3 \left (8 a^2-37 a b+35 b^2\right ) (a-b) \log (\sin (c+d x)+1)+3 (a+b) \left (8 a^2+37 a b+35 b^2\right ) \log (1-\sin (c+d x))+72 a b^2 \sin ^2(c+d x)-\frac {3 (a-b)^3}{(\sin (c+d x)+1)^2}+\frac {3 (7 a-13 b) (a-b)^2}{\sin (c+d x)+1}-\frac {3 (a+b)^2 (7 a+13 b)}{\sin (c+d x)-1}-\frac {3 (a+b)^3}{(\sin (c+d x)-1)^2}+16 b^3 \sin ^3(c+d x)}{48 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.49, size = 238, normalized size = 1.18 \[ \frac {72 \, a b^{2} \cos \left (d x + c\right )^{6} - 36 \, a b^{2} \cos \left (d x + c\right )^{4} - 3 \, {\left (8 \, a^{3} - 45 \, a^{2} b + 72 \, a b^{2} - 35 \, b^{3}\right )} \cos \left (d x + c\right )^{4} \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, {\left (8 \, a^{3} + 45 \, a^{2} b + 72 \, a b^{2} + 35 \, b^{3}\right )} \cos \left (d x + c\right )^{4} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 12 \, a^{3} + 36 \, a b^{2} - 24 \, {\left (2 \, a^{3} + 9 \, a b^{2}\right )} \cos \left (d x + c\right )^{2} + 2 \, {\left (8 \, b^{3} \cos \left (d x + c\right )^{6} - 8 \, {\left (9 \, a^{2} b + 10 \, b^{3}\right )} \cos \left (d x + c\right )^{4} + 18 \, a^{2} b + 6 \, b^{3} - 3 \, {\left (27 \, a^{2} b + 13 \, b^{3}\right )} \cos \left (d x + c\right )^{2}\right )} \sin \left (d x + c\right )}{48 \, d \cos \left (d x + c\right )^{4}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.34, size = 251, normalized size = 1.24 \[ -\frac {16 \, b^{3} \sin \left (d x + c\right )^{3} + 72 \, a b^{2} \sin \left (d x + c\right )^{2} + 144 \, a^{2} b \sin \left (d x + c\right ) + 144 \, b^{3} \sin \left (d x + c\right ) + 3 \, {\left (8 \, a^{3} - 45 \, a^{2} b + 72 \, a b^{2} - 35 \, b^{3}\right )} \log \left ({\left | \sin \left (d x + c\right ) + 1 \right |}\right ) + 3 \, {\left (8 \, a^{3} + 45 \, a^{2} b + 72 \, a b^{2} + 35 \, b^{3}\right )} \log \left ({\left | \sin \left (d x + c\right ) - 1 \right |}\right ) - \frac {6 \, {\left (6 \, a^{3} \sin \left (d x + c\right )^{4} + 54 \, a b^{2} \sin \left (d x + c\right )^{4} + 27 \, a^{2} b \sin \left (d x + c\right )^{3} + 13 \, b^{3} \sin \left (d x + c\right )^{3} - 4 \, a^{3} \sin \left (d x + c\right )^{2} - 72 \, a b^{2} \sin \left (d x + c\right )^{2} - 21 \, a^{2} b \sin \left (d x + c\right ) - 11 \, b^{3} \sin \left (d x + c\right ) + 24 \, a b^{2}\right )}}{{\left (\sin \left (d x + c\right )^{2} - 1\right )}^{2}}}{48 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.34, size = 420, normalized size = 2.08 \[ \frac {a^{3} \left (\tan ^{4}\left (d x +c \right )\right )}{4 d}-\frac {a^{3} \left (\tan ^{2}\left (d x +c \right )\right )}{2 d}-\frac {a^{3} \ln \left (\cos \left (d x +c \right )\right )}{d}+\frac {3 a^{2} b \left (\sin ^{7}\left (d x +c \right )\right )}{4 d \cos \left (d x +c \right )^{4}}-\frac {9 a^{2} b \left (\sin ^{7}\left (d x +c \right )\right )}{8 d \cos \left (d x +c \right )^{2}}-\frac {9 a^{2} b \left (\sin ^{5}\left (d x +c \right )\right )}{8 d}-\frac {15 a^{2} b \left (\sin ^{3}\left (d x +c \right )\right )}{8 d}-\frac {45 a^{2} b \sin \left (d x +c \right )}{8 d}+\frac {45 a^{2} b \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8 d}+\frac {3 a \,b^{2} \left (\sin ^{8}\left (d x +c \right )\right )}{4 d \cos \left (d x +c \right )^{4}}-\frac {3 a \,b^{2} \left (\sin ^{8}\left (d x +c \right )\right )}{2 d \cos \left (d x +c \right )^{2}}-\frac {3 a \,b^{2} \left (\sin ^{6}\left (d x +c \right )\right )}{2 d}-\frac {9 a \,b^{2} \left (\sin ^{4}\left (d x +c \right )\right )}{4 d}-\frac {9 a \,b^{2} \left (\sin ^{2}\left (d x +c \right )\right )}{2 d}-\frac {9 a \,b^{2} \ln \left (\cos \left (d x +c \right )\right )}{d}+\frac {b^{3} \left (\sin ^{9}\left (d x +c \right )\right )}{4 d \cos \left (d x +c \right )^{4}}-\frac {5 b^{3} \left (\sin ^{9}\left (d x +c \right )\right )}{8 d \cos \left (d x +c \right )^{2}}-\frac {5 b^{3} \left (\sin ^{7}\left (d x +c \right )\right )}{8 d}-\frac {7 \left (\sin ^{5}\left (d x +c \right )\right ) b^{3}}{8 d}-\frac {35 b^{3} \left (\sin ^{3}\left (d x +c \right )\right )}{24 d}-\frac {35 b^{3} \sin \left (d x +c \right )}{8 d}+\frac {35 b^{3} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8 d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.35, size = 217, normalized size = 1.07 \[ -\frac {16 \, b^{3} \sin \left (d x + c\right )^{3} + 72 \, a b^{2} \sin \left (d x + c\right )^{2} + 3 \, {\left (8 \, a^{3} - 45 \, a^{2} b + 72 \, a b^{2} - 35 \, b^{3}\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) + 3 \, {\left (8 \, a^{3} + 45 \, a^{2} b + 72 \, a b^{2} + 35 \, b^{3}\right )} \log \left (\sin \left (d x + c\right ) - 1\right ) + 144 \, {\left (a^{2} b + b^{3}\right )} \sin \left (d x + c\right ) - \frac {6 \, {\left ({\left (27 \, a^{2} b + 13 \, b^{3}\right )} \sin \left (d x + c\right )^{3} - 6 \, a^{3} - 30 \, a b^{2} + 4 \, {\left (2 \, a^{3} + 9 \, a b^{2}\right )} \sin \left (d x + c\right )^{2} - {\left (21 \, a^{2} b + 11 \, b^{3}\right )} \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{4} - 2 \, \sin \left (d x + c\right )^{2} + 1}}{48 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 12.12, size = 512, normalized size = 2.53 \[ \frac {\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )\,\left (a^3+9\,a\,b^2\right )}{d}-\frac {\left (-\frac {45\,a^2\,b}{4}-\frac {35\,b^3}{4}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{13}+\left (-2\,a^3-18\,a\,b^2\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{12}+\left (\frac {15\,a^2\,b}{2}+\frac {35\,b^3}{6}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{11}+\left (2\,a^3+18\,a\,b^2\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}+\left (\frac {141\,a^2\,b}{4}+\frac {329\,b^3}{12}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9+\left (16\,a^3+48\,a\,b^2\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+\left (33\,a^2\,b-17\,b^3\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+\left (16\,a^3+48\,a\,b^2\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+\left (\frac {141\,a^2\,b}{4}+\frac {329\,b^3}{12}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+\left (2\,a^3+18\,a\,b^2\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+\left (\frac {15\,a^2\,b}{2}+\frac {35\,b^3}{6}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+\left (-2\,a^3-18\,a\,b^2\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+\left (-\frac {45\,a^2\,b}{4}-\frac {35\,b^3}{4}\right )\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left (-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{14}+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{12}+3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}-3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8-3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-1\right )}-\frac {\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1\right )\,\left (a-b\right )\,\left (8\,a^2-37\,a\,b+35\,b^2\right )}{8\,d}-\frac {\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-1\right )\,\left (a+b\right )\,\left (8\,a^2+37\,a\,b+35\,b^2\right )}{8\,d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________